package com.emr.web.controller.emr;


import com.emr.framework.web.page.TableDataInfo;
import com.emr.module.domain.Group;
import com.emr.module.service.IGroupTongJiService;
import com.emr.module.service.IGroupTongZhiService;
import com.emr.module.service.IPersonalService;
import com.emr.system.domain.SysUser;
import com.emr.system.service.ISysUserService;
import com.emr.web.core.base.BaseController;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
 * 院内会诊统计 信息操作处理
 * 
 * @author emr
 * @date 2019-02-28
 */
@Controller
@RequestMapping("/module/grouptongji")
public class GroupTongJiController extends BaseController
{
    private String prefix = "module/grouptongji";
	
	@Autowired
	private IGroupTongJiService groupTongJiService;

	@Autowired
	private IGroupTongZhiService groupTongZhiService;

	@RequiresPermissions("module:grouptongji:view")
	@GetMapping()
	public String group()
	{
	    return prefix + "/grouptongji";
	}
	
	/**
	 * 查询院内会诊列表
	 */
	@RequiresPermissions("module:grouptongji:list")
	@PostMapping("/list")
	@ResponseBody
	public List list(Group group)
	{
		//可以封装会诊时间
		SysUser user = getUser();
        List list = groupTongJiService.selectHuiZhenList();
		return list;
	}

	@RequiresPermissions("module:grouptongji:listBar")
	@PostMapping("/listBar")
	@ResponseBody
	public List listBar(Map map)
	{
		//可以封装会诊时间
		SysUser user = getUser();
		List list = groupTongJiService.selectListBar();
		return list;
	}
}
